﻿using Coldairarrow.Entity.Base;
using Coldairarrow.Entity.DTO;
using Coldairarrow.IBusiness.DTO;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.Base
{
    public partial interface IBase_RepairOrderBusiness
    {
        Task<PageResult<Base_RepairOrder>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<Base_RepairOrder> GetTheDataAsync(string id);
        Task AddDataAsync(Base_RepairOrder data);
        Task UpdateDataAsync(Base_RepairOrder data);
        Task DeleteDataAsync(List<string> ids);
        Task<Base_RepairOrder> GetTheDataAsyncQQQ(string id);
        /// <summary>
        /// 保存维修工单及明细数据
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task AddDataList(Base_Base_RepairOrderlistinfo data);
        /// <summary>
        /// 修改明细信息
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task UpdateDataList(Base_Base_RepairOrderlistinfo data);

        // <summary>
        /// 维修领料 获取维修信息
        /// </summary>
        /// <param name="RepairOrderQrCode"></param>
        /// <returns></returns>
        Task<Base_RepairOrPDADTO> GetPDADataListMain(string RepairOrderQrCode);
        /// <summary>
        /// 维修领料 获取明细信息
        /// </summary>
        /// <param name="RepairOrderQrCode"></param>
        /// <returns></returns>
        Task<Base_RepairOrderDetailsPDADTO> GetPDADataListInfo(string RepairOrderQrCode);
        /// <summary>
        /// PDA维修领料获取 物料数据
        /// </summary>
        /// <returns></returns>
        Task<Base_RepairOrderDetailsPDADTO> GetRepairOrderDetailsPDANumber(string RepairOrderCode, string MaterialCode);
        /// <summary>
        /// 更新库存数据
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
         Task UpdateStockUpDataAsync(UpdateInventory data);
        /// <summary>
        /// 移除操作
        /// </summary>
        /// <param name="stockupQrCode">派工单二维码</param>
        /// <param name="packqrocde">二维码</param>
        /// <param name="nums"></param>
        /// <returns></returns>
        Task DeleteStockUpDetailListDataAsync(string stockupQrCode, string packqrocde, double nums);
/// <summary>
/// 出库提交动作
/// </summary>
/// <param name="RefCode">维修单号</param>
/// <param name="stockupQrCode">维修明细号</param>
/// <returns></returns>
        Task SubmitStockUpDataAsync(string RefCode, string stockupQrCode);


        // <summary>
        /// 维修领料完成 获取出库物料汇总
        /// </summary>
        /// <param name="RepairOrderQrCode"></param>
        /// <returns></returns>
        Task<Base_RepairOrderOK> GetPDADataListOK(string RepairOrderQrCode);


        /// <summary>
        /// 完成操作
        /// </summary>
        /// <param name="PurchaseId"></param>
        /// <returns></returns>
        Task Operationcompleted(string Id);
    }
}